
//: @"搭讪礼物" 
Byte kOwlBlackberryDust[] = {
    144, 12, 3, 4, 233, 147, 176, 235, 177, 173, 234, 167, 191, 234, 140, 172, 26
};

//: @"你收到礼物 【%@】," 
Byte kArmadilloPitchElderberry[] = {
    57, 25, 66, 4, 38, 255, 226, 40, 214, 248, 39, 202, 242, 41, 230, 254, 41, 203, 235, 98, 37, 194, 210, 103, 130, 37, 194, 211, 110, 15
};

//: @"你收到见面礼物 【%@】," 
Byte kTomatoSteamDonkey[] = {
    179, 31, 34, 4, 6, 223, 194, 8, 182, 216, 7, 170, 210, 10, 201, 163, 11, 191, 196, 9, 198, 222, 9, 171, 203, 66, 5, 162, 178, 71, 98, 5, 162, 179, 78, 89
};

//: @"你收到搭讪礼物 " 
Byte kImpalaHoneySimmer[] = {
    248, 22, 77, 4, 49, 10, 237, 51, 225, 3, 50, 213, 253, 51, 221, 250, 53, 251, 247, 52, 241, 9, 52, 214, 246, 109, 24
};

//: @"你收到抽奖礼物 【%@】," 
Byte kChopCaribouGoose[] = {
    58, 31, 42, 4, 14, 231, 202, 16, 190, 224, 15, 178, 218, 16, 180, 231, 15, 207, 192, 17, 206, 230, 17, 179, 211, 74, 13, 170, 186, 79, 106, 13, 170, 187, 86, 74
};

//: @"亲密度+%.2f°" 
Byte kDatePeacockVarnish[] = {
    10, 16, 55, 4, 27, 241, 233, 28, 230, 189, 28, 241, 221, 98, 92, 101, 105, 157, 249, 231, 117
};

//: @"你赠送了礼物 【%@】," 
Byte kNewtPinkGuavaTrek[] = {
    137, 28, 49, 4, 21, 238, 209, 25, 230, 209, 26, 177, 178, 21, 235, 183, 24, 213, 237, 24, 186, 218, 81, 20, 177, 193, 86, 113, 20, 177, 194, 93, 11
};

//: @"你赠送了见面礼物 【%@】," 
Byte kTangeloSkateboardBlackPanther[] = {
    228, 34, 29, 4, 1, 218, 189, 5, 210, 189, 6, 157, 158, 1, 215, 163, 5, 196, 158, 6, 186, 191, 4, 193, 217, 4, 166, 198, 61, 0, 157, 173, 66, 93, 0, 157, 174, 73, 163
};

//: @"你赠送了搭讪礼物 " 
Byte kFoxBlendPinkGuava[] = {
    234, 25, 80, 4, 52, 13, 240, 56, 5, 240, 57, 208, 209, 52, 10, 214, 54, 224, 253, 56, 254, 250, 55, 244, 12, 55, 217, 249, 112, 155
};

//: @"你赠送了抽奖礼物 【%@】," 
Byte kBoundLemonMagpie[] = {
    152, 34, 7, 4, 235, 196, 167, 239, 188, 167, 240, 135, 136, 235, 193, 141, 237, 145, 196, 236, 172, 157, 238, 171, 195, 238, 144, 176, 39, 234, 135, 151, 44, 71, 234, 135, 152, 51, 3
};

//: @"chat/normal/texiao" 
Byte kDragonFruitRestoreYak[] = {
    63, 18, 99, 4, 198, 203, 196, 215, 146, 209, 210, 213, 208, 196, 207, 146, 215, 200, 219, 204, 196, 210, 35
};

//
//  GVMessagePresentCell.m
//  ChatDemo
//
//  Created by 九月 on 1/20/25.
//

#import "GVMessagePresentCell.h"

#import "XVXLPresentMessage.h"

@interface GVMessagePresentCell ()

@property (nonatomic, strong) UIImageView *effectImageView;
@property (nonatomic, strong) UIButton *ttotheEffectBtn;

@property (nonatomic, strong) UIImageView *textGiftImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *desLabel;

@end

@implementation GVMessagePresentCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];

    if (self) {
        [self initialize];
    }

    return self;
}

+ (CGSize)sizeForMessageModel:(JVHGMessageModel *)model
      withCollectionViewWidth:(CGFloat)collectionViewWidth
         referenceExtraHeight:(CGFloat)extraHeight
{
    XVXLPresentMessage *giftMessage = (XVXLPresentMessage *)model.content;

    if (model.conversationType == ConversationType_PRIVATE) {
        if (giftMessage.heiyouTextGrape.length > 0) {
            CGFloat textHeight = 0;
            return CGSizeMake(collectionViewWidth, 138 + textHeight + extraHeight);
        } else {
            return CGSizeMake(collectionViewWidth, 130 + extraHeight);
        }
    } else if (model.conversationType == ConversationType_GROUP) {
        return CGSizeMake(collectionViewWidth, 61 + extraHeight);
    }

    return CGSizeMake(collectionViewWidth, 61 + extraHeight);
}

- (void)initialize {
    self.effectImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
    [self.messageContentView addSubview:self.effectImageView];
    [_effectImageView addSubview:self.ttotheEffectBtn];
//    [_effectImageView addSubview:self.chatupLabel];


    _effectImageView.userInteractionEnabled = YES;

    //这里用来显示文字礼物搭讪样式
    self.bubbleBackgroundView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 210, 158)];
    self.bubbleBackgroundView.userInteractionEnabled = YES;
    self.bubbleBackgroundView.backgroundColor = [UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:1];
    self.bubbleBackgroundView.layer.cornerRadius = 5;
    self.bubbleBackgroundView.layer.masksToBounds = YES;
    [self.messageContentView addSubview:self.bubbleBackgroundView];

    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 10, self.bubbleBackgroundView.width - 30, 20)];
    self.titleLabel.textColor = [UIColor colorWithRed:0 / 255.0 green:0 / 255.0 blue:0 / 255.0 alpha:1];
    self.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
    [self.bubbleBackgroundView addSubview:self.titleLabel];
    self.titleLabel.textAlignment = NSTextAlignmentLeft;
    self.titleLabel.numberOfLines = 0;


    self.textGiftImageView = [[UIImageView alloc] initWithFrame:CGRectMake((self.bubbleBackgroundView.width - 100) / 2.0, _titleLabel.bottom + 12, 100, 100)];
    [self.bubbleBackgroundView addSubview:self.textGiftImageView];


    self.desLabel = [[UILabel alloc] initWithFrame:CGRectMake(_textGiftImageView.width - 46, _textGiftImageView.height - 18, 46, 18)];
    self.desLabel.textColor = [UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:1];
    self.desLabel.font = [UIFont systemFontOfSize:9 weight:UIFontWeightMedium];
    //: self.desLabel.text = @"搭讪礼物";
    self.desLabel.text = kTTotheString(kOwlBlackberryDust);

    self.desLabel.textAlignment = NSTextAlignmentCenter;
    [_textGiftImageView addSubview:self.desLabel];

    self.desLabel.backgroundColor = [UIColor colorWithRed:255 / 255.0 green:106 / 255.0 blue:110 / 255.0 alpha:1];
    self.desLabel.layer.cornerRadius = 4;
    self.desLabel.layer.masksToBounds = YES;

    _textGiftImageView.userInteractionEnabled = YES;

    self.bubbleBackgroundView.hidden = YES;
}

- (void)didTapMessageContentView {
    XVXLPresentMessage *giftMessage = (XVXLPresentMessage *)self.model.content;
    if (giftMessage && giftMessage.cungunSvglinkWatermelon.length>0) {
//        [UNWMGiftPlayerUtil.share SVGPlayLinkUrl:giftMessage.cungunSvglinkWatermelon ttatheMySender:self.model.messageDirection == MessageDirection_SEND];
    }
}
    

- (void)setDataModel:(JVHGMessageModel *)model
{
    [super setDataModel:model];

//    self.uiconLabel.hidden = YES;
//    self.uiconimageView.hidden = YES;

    XVXLPresentMessage *giftMessage = (XVXLPresentMessage *)model.content;

    if (model.conversationType == ConversationType_PRIVATE) {
        self.bubbleBackgroundView.hidden = NO;
        self.effectImageView.hidden = NO;
//        self.promptLabel.hidden = NO;

//        self.groupGiftView.hidden = YES;
        if (giftMessage) {
            if (giftMessage.heiyouTextGrape.length > 0) {
                self.effectImageView.hidden = YES;
//                self.promptLabel.hidden = YES;
                self.bubbleBackgroundView.hidden = NO;
                CGFloat textHeight = 0;
                [self.textGiftImageView sd_setImageWithURL:giftMessage.heiyouIconBanana placeholderImage:nil];
                self.titleLabel.text = giftMessage.heiyouTextGrape;
                self.titleLabel.height = textHeight;
                self.textGiftImageView.top = 10 + textHeight + 12;
                CGRect messageContentViewRect = self.messageContentView.frame;

                if (model.messageDirection == MessageDirection_RECEIVE) {
                    messageContentViewRect.size.width = 210;
                    messageContentViewRect.size.height = 138 + textHeight;
                    self.messageContentView.frame = messageContentViewRect;
                    self.bubbleBackgroundView.frame = self.messageContentView.bounds;
                } else {
                    messageContentViewRect.size.width = 210;
                    messageContentViewRect.size.height = 138 + textHeight;
                    messageContentViewRect.origin.x =
                        self.baseContentView.bounds.size.width -
                        (210 + 8 + 0 + 10);
                    self.messageContentView.frame = messageContentViewRect;
                    self.bubbleBackgroundView.frame = self.messageContentView.bounds;
                }

                if (model.messageDirection == MessageDirection_RECEIVE) {
                    if (giftMessage.ayiguUgoldGrape > 0) {
                        //接受方
//                        self.uiconLabel.hidden = NO;
//                        self.uiconimageView.hidden = NO;
                        //发送方
//                        self.uiconimageView.frame = CGRectMake(self.bubbleBackgroundView.right + 5, self.bubbleBackgroundView.bottom - 20, 20, 20);
//
//                        self.uiconLabel.text = [NSString stringWithFormat:@"+%.02f", giftMessage.ayiguUgoldGrape];
//
//                        self.uiconLabel.frame = CGRectMake(self.uiconimageView.right + 2, self.uiconimageView.top, 50, 20);
//                        self.uiconLabel.textAlignment = NSTextAlignmentLeft;
//                        [self.uiconimageView ttathe_setImageWith:@"mine/ubao"];
//                        self.uiconLabel.textColor = [UIColor colorWithRed:255 / 255.0 green:106 / 255.0 blue:110 / 255.0 alpha:1];
                    }
                }
            } else {
                self.bubbleBackgroundView.hidden = YES;
                self.effectImageView.hidden = NO;
//                self.promptLabel.hidden = NO;

                [self.effectImageView sd_setImageWithURL:giftMessage.heiyouIconBanana placeholderImage:nil];
                CGRect messageContentViewRect = self.messageContentView.frame;

                if (model.messageDirection == MessageDirection_RECEIVE) {
                    messageContentViewRect.size.width = 100;
                    messageContentViewRect.size.height = 100;
                    self.messageContentView.frame = messageContentViewRect;
                    self.effectImageView.frame = self.messageContentView.bounds;

                    //: NSString *receiveprompt = [NSString stringWithFormat:@"你收到礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                    NSString *receiveprompt = [NSString stringWithFormat:kTTotheString(kArmadilloPitchElderberry), giftMessage.fanyouNameWatermelon];


                    if (giftMessage.fanfanSourceBanana == 3) {
                        self.ttotheEffectBtn.hidden = YES;
//                        self.chatupLabel.hidden = NO;
//                        self.chatupLabel.text = @"见面礼物";
//                        self.chatupLabel.frame = CGRectMake(0, self.effectImageView.height - 18, 46, 18);
                        //: receiveprompt = [NSString stringWithFormat:@"你收到见面礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                        receiveprompt = [NSString stringWithFormat:kTTotheString(kTomatoSteamDonkey), giftMessage.fanyouNameWatermelon];

                    } else {
                        if (giftMessage.fanfanGifttypeWatermelon == 2) {
                            self.ttotheEffectBtn.hidden = YES;
//                            self.chatupLabel.hidden = NO;
//                            self.chatupLabel.text = @"搭讪礼物";
//                            self.chatupLabel.frame = CGRectMake(0, self.effectImageView.height - 18, 46, 18);
                            //: receiveprompt = @"你收到搭讪礼物 "; //[NSString stringWithFormat:@"你收到搭讪礼物 【%@】,",giftMessage.name];
                            receiveprompt = kTTotheString(kImpalaHoneySimmer); //[NSString stringWithFormat:@"你收到搭讪礼物 【%@】,",giftMessage.name];

                        } else {
                            self.ttotheEffectBtn.hidden = NO;
//                            self.chatupLabel.hidden = YES;
                            self.ttotheEffectBtn.frame = CGRectMake(0, self.effectImageView.height - 18, 40, 18);

                            if (giftMessage.fanfanSourceBanana == 1) {
                                //: receiveprompt = [NSString stringWithFormat:@"你收到礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                                receiveprompt = [NSString stringWithFormat:kTTotheString(kArmadilloPitchElderberry), giftMessage.fanyouNameWatermelon];

                            } else if (giftMessage.fanfanSourceBanana == 2) {
                                //: receiveprompt = [NSString stringWithFormat:@"你收到抽奖礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                                receiveprompt = [NSString stringWithFormat:kTTotheString(kChopCaribouGoose), giftMessage.fanyouNameWatermelon];

                            }
                        }
                    }

                    //: NSString *intimacyScore = [NSString stringWithFormat:@"亲密度+%.2f°", giftMessage.fanyouUcoinDurian / 10.0];
                    NSString *intimacyScore = [NSString stringWithFormat:kTTotheString(kDatePeacockVarnish), giftMessage.fanyouUcoinDurian / 10.0];

                    NSAttributedString *receiveString = [[NSAttributedString alloc]initWithString:receiveprompt attributes:@{ NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:11 weight:UIFontWeightRegular] }];
                    NSAttributedString *intimacyScoreString = [[NSAttributedString alloc]initWithString:intimacyScore attributes:@{ NSForegroundColorAttributeName: [UIColor colorWithRed:255 / 255.0 green:106 / 255.0 blue:110 / 255.0 alpha:1], NSFontAttributeName: [UIFont systemFontOfSize:11 weight:UIFontWeightRegular] }];
                    NSMutableAttributedString *mutableAttribure = [[NSMutableAttributedString alloc]initWithAttributedString:receiveString];
                    [mutableAttribure appendAttributedString:intimacyScoreString];
//                    self.promptLabel.attributedText = mutableAttribure;
//                    [self.promptLabel sizeToFit];
//                    self.promptLabel.width += 30;
//                    //            self.promptLabel.x = (self.baseContentView.width-self.promptLabel.width)/2;
//                    //            self.promptLabel.y = self.messageContentView.bottom+5;
//                    self.promptLabel.frame = CGRectMake((self.baseContentView.width - self.promptLabel.width) / 2, self.messageContentView.bottom + 5, self.promptLabel.width, 25);
                } else {
                    messageContentViewRect.size.width = 100;
                    messageContentViewRect.size.height = 100;
                    messageContentViewRect.origin.x =
                        self.baseContentView.bounds.size.width -
                        (100 + 8 + 0 + 10);
                    self.messageContentView.frame = messageContentViewRect;
                    self.effectImageView.frame = self.messageContentView.bounds;
                    //: NSString *receiveprompt = [NSString stringWithFormat:@"你赠送了礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                    NSString *receiveprompt = [NSString stringWithFormat:kTTotheString(kNewtPinkGuavaTrek), giftMessage.fanyouNameWatermelon];


                    if (giftMessage.fanfanSourceBanana == 3) {
                        self.ttotheEffectBtn.hidden = YES;
//                        self.chatupLabel.hidden = NO;
//                        self.chatupLabel.text = @"见面礼物";
//                        self.chatupLabel.frame = CGRectMake(self.effectImageView.width - 46, self.effectImageView.height - 18, 46, 18);
                        //: receiveprompt =  [NSString stringWithFormat:@"你赠送了见面礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                        receiveprompt =  [NSString stringWithFormat:kTTotheString(kTangeloSkateboardBlackPanther), giftMessage.fanyouNameWatermelon];

                    } else {
                        if (giftMessage.fanfanGifttypeWatermelon == 2) {
                            self.ttotheEffectBtn.hidden = YES;
//                            self.chatupLabel.hidden = NO;
//                            self.chatupLabel.text = @"搭讪礼物";
//                            self.chatupLabel.frame = CGRectMake(self.effectImageView.width - 46, self.effectImageView.height - 18, 46, 18);
                            //: receiveprompt = @"你赠送了搭讪礼物 ";//[NSString stringWithFormat:@"你赠送了搭讪礼物 【%@】,",giftMessage.name];
                            receiveprompt = kTTotheString(kFoxBlendPinkGuava);//[NSString stringWithFormat:@"你赠送了搭讪礼物 【%@】,",giftMessage.name];

                        } else {
                            self.ttotheEffectBtn.frame = CGRectMake(self.effectImageView.width - 40, self.effectImageView.height - 18, 40, 18);
                            self.ttotheEffectBtn.hidden = NO;
//                            self.chatupLabel.hidden = YES;

                            if (giftMessage.fanfanSourceBanana == 1) {
                                //: receiveprompt =  [NSString stringWithFormat:@"你赠送了礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                                receiveprompt =  [NSString stringWithFormat:kTTotheString(kNewtPinkGuavaTrek), giftMessage.fanyouNameWatermelon];

                            } else if (giftMessage.fanfanSourceBanana == 2) {
                                //: receiveprompt =  [NSString stringWithFormat:@"你赠送了抽奖礼物 【%@】,", giftMessage.fanyouNameWatermelon];
                                receiveprompt =  [NSString stringWithFormat:kTTotheString(kBoundLemonMagpie), giftMessage.fanyouNameWatermelon];

                            }
                        }
                    }

                    //: NSString *intimacyScore = [NSString stringWithFormat:@"亲密度+%.2f°", giftMessage.fanyouUcoinDurian / 10.00];
                    NSString *intimacyScore = [NSString stringWithFormat:kTTotheString(kDatePeacockVarnish), giftMessage.fanyouUcoinDurian / 10.00];

                    NSAttributedString *receiveString = [[NSAttributedString alloc]initWithString:receiveprompt attributes:@{ NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:11 weight:UIFontWeightRegular] }];
                    NSAttributedString *intimacyScoreString = [[NSAttributedString alloc]initWithString:intimacyScore attributes:@{ NSForegroundColorAttributeName: [UIColor colorWithRed:255 / 255.0 green:106 / 255.0 blue:110 / 255.0 alpha:1], NSFontAttributeName: [UIFont systemFontOfSize:11 weight:UIFontWeightRegular] }];
                    NSMutableAttributedString *mutableAttribure = [[NSMutableAttributedString alloc]initWithAttributedString:receiveString];
                    [mutableAttribure appendAttributedString:intimacyScoreString];
//                    self.promptLabel.attributedText = mutableAttribure;
//                    [self.promptLabel sizeToFit];
//                    self.promptLabel.width += 30;
//                    //            self.promptLabel.x = (self.baseContentView.width-self.promptLabel.width)/2;
//                    //            self.promptLabel.y = self.messageContentView.bottom+5;
//                    self.promptLabel.frame = CGRectMake((self.baseContentView.width - self.promptLabel.width) / 2, self.messageContentView.bottom + 5, self.promptLabel.width, 25);
                }

                if (model.messageDirection == MessageDirection_SEND) {
                    //            if ([giftMessage.uCoin floatValue] > 0) {
                    //                self.uiconLabel.hidden = NO;
                    //                self.uiconimageView.hidden = NO;
                    //                //发送方
                    //                self.uiconimageView.frame = CGRectMake(self.effectImageView.left-20-5,self.effectImageView.bottom-20,20, 20);
                    //
                    //    //                    self.uiconLabel.text = [NSString stringWithFormat:@"-%@",extraDic[@"uCoin"]];
                    //                self.uiconLabel.text = [NSString stringWithFormat:@"-%@",@([giftMessage.uCoin floatValue])];
                    //                self.uiconLabel.frame = CGRectMake(self.uiconimageView.x-52,self.uiconimageView.top,50, 20);
                    //                self.uiconLabel.textAlignment = NSTextAlignmentRight;
                    //                self.uiconimageView.image = [UIImage imageNamed:@"message_chargeIcon"];
                    //                self.uiconLabel.textColor = UIColorFromString(@"#B8BBBE");
                    //            }
                } else {
                    if (giftMessage.ayiguUgoldGrape > 0) {
//                        //接受方
//                        self.uiconLabel.hidden = NO;
//                        self.uiconimageView.hidden = NO;
//                        //发送方
//                        self.uiconimageView.frame = CGRectMake(self.effectImageView.right + 5, self.effectImageView.bottom - 20, 20, 20);
//
//                        self.uiconLabel.text = [NSString stringWithFormat:@"+%.02f", giftMessage.ayiguUgoldGrape];
//
//                        self.uiconLabel.frame = CGRectMake(self.uiconimageView.right + 2, self.uiconimageView.top, 50, 20);
//                        self.uiconLabel.textAlignment = NSTextAlignmentLeft;
//                        [self.uiconimageView ttathe_setImageWith:@"mine/ubao"];
//                        self.uiconLabel.textColor = [UIColor colorWithRed:255 / 255.0 green:106 / 255.0 blue:110 / 255.0 alpha:1];
                    }
                }
            }
        }
    }
    

//    else if (model.conversationType == ConversationType_GROUP)
//    {
//        self.bubbleBackgroundView.hidden = YES;
//        self.effectImageView.hidden = YES;
//        self.promptLabel.hidden = YES;
//        self.groupGiftView.hidden = NO;
//
//
//        UIColor *sexcolor;
//        if ([giftMessage.receiveUserSex intValue] == 1){
//            sexcolor = UIColorFromString(@"#3FA7FF");
//        }else
//        {
//            sexcolor = UIColorFromString(@"#F759AB");
//        }
//        NSMutableAttributedString *mutableAttribute = [[NSMutableAttributedString alloc]initWithString:@"送给" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15 weight:UIFontWeightRegular],NSForegroundColorAttributeName:UIColorFromString(@"#000000")}];
//        NSAttributedString *attribute = [[NSAttributedString alloc]initWithString:fdnonNil(giftMessage.receiveUserName) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15 weight:UIFontWeightRegular],NSForegroundColorAttributeName:sexcolor}];
//        [mutableAttribute appendAttributedString:attribute];
//        self.groupTitleLabel.attributedText = mutableAttribute;
//
//
//
//        self.groupDesLabel.text = giftMessage.name;
//
//        [self.groupGiftimageView sd_setImageWithURL:[NSURL URLWithString:giftMessage.icon] placeholderImage:banxinToImageWithPath(@"yublogin/keepYban_yy_mr_icon")];
//
//        CGRect messageContentViewRect = self.messageContentView.frame;
//        messageContentViewRect.size.width = 220;
//        messageContentViewRect.size.height = 62;
//        if (model.messageDirection == MessageDirection_RECEIVE) {
//            self.messageContentView.frame = messageContentViewRect;
//            self.groupGiftView.frame = self.messageContentView.bounds;
//            self.groupTitleLabel.frame = CGRectMake(12,9,self.groupGiftView.width-12-12-76,20);
//            self.groupTitleLabel.textAlignment = NSTextAlignmentLeft;
//
//            self.groupDesLabel.frame = CGRectMake(12,self.groupTitleLabel.bottom+4,self.groupGiftView.width-12-12-76,20);
//            self.groupDesLabel.textAlignment = NSTextAlignmentLeft;
//
//            self.groupGiftimageView.frame = CGRectMake(self.groupGiftView.width-76,-7,76,76);
//
//
//        } else {
//            messageContentViewRect.size.width = 220;
//            messageContentViewRect.size.height = 62;
//            messageContentViewRect.origin.x =
//            self.baseContentView.bounds.size.width -
//            (210 + 8 + YUBKeepkoKitConfigCenter.ui.globalMessagePortraitSize.width + 10);
//            self.messageContentView.frame = messageContentViewRect;
//
//            self.groupGiftView.frame = self.messageContentView.bounds;
//
//            self.groupGiftimageView.frame = CGRectMake(0,-7,76,76);
//
//            self.groupTitleLabel.frame = CGRectMake(self.groupGiftimageView.right+12,9,self.groupGiftView.width-12-12-76,20);
//            self.groupTitleLabel.textAlignment = NSTextAlignmentLeft;
//
//            self.groupDesLabel.frame = CGRectMake(self.groupGiftimageView.right+12,self.groupTitleLabel.bottom+4,self.groupGiftView.width-12-12-76,20);
//            self.groupDesLabel.textAlignment = NSTextAlignmentLeft;
//
//        }
//    }
    
//    self.ttotheVipView.hidden = YES;
}

- (UIButton *)ttotheEffectBtn {
    if (!_ttotheEffectBtn) {
        _ttotheEffectBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        //: [_ttotheEffectBtn ttathe_setBackgroundImageWith:@"chat/normal/texiao" forState:UIControlStateNormal];

        _ttotheEffectBtn.adjustsImageWhenHighlighted = NO;
        _ttotheEffectBtn.size = CGSizeMake(40, 18);
        _ttotheEffectBtn.userInteractionEnabled = NO;
//        [_ttotheEffectBtn addTarget:self action:@selector(ttotheOnShowGiftAction) forControlEvents:UIControlEventTouchUpInside];
    }

    return _ttotheEffectBtn;
}

@end

